/*
    This file is part of SQLiteGTK, written by Aly Hirani

    SQLiteGTK is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    SQLiteGTK is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with SQLiteGTK.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __MAIN_WINDOW_SQLITE_H__
#define __MAIN_WINDOW_SQLITE_H__

#define DATABASE_STATUS_CONTEXT_KEY "database_status_context"
#define DATABASE_STATUS_MESSAGE_KEY "database_status_message"

typedef struct 
{
	GtkTreeView *view;
	GtkListStore *store;
	GtkTreeIter iter;
	gboolean columns_initialized;
} SqliteCallback;

inline void main_window_sqlite_set_database(GtkWindow *window, sqlite3 *db);
inline sqlite3* main_window_sqlite_get_database(GtkWindow *window);
inline gboolean main_window_sqlite_is_open(GtkWindow *window);
void main_window_sqlite_open_database(GtkBuilder *builder, const gchar* filename);
gint main_window_sqlite_execute_query_cb(void *data, gint argc, gchar **columns_data, gchar **columns_name);

#endif /* __MAIN_WINDOW_SQLITE_H__ */
